package com.nmf.dao.gen;

import com.nmf.dao.gen.bean.BizBillZhuanjia;
import com.nmf.dao.gen.bean.BizBillZhuanjiaExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface BizBillZhuanjiaMapper {
    /** biz_bill_zhuanjia */
    @SelectProvider(type=BizBillZhuanjiaSqlProvider.class, method="countByExample")
    long countByExample(BizBillZhuanjiaExample example);

    /** biz_bill_zhuanjia */
    @DeleteProvider(type=BizBillZhuanjiaSqlProvider.class, method="deleteByExample")
    int deleteByExample(BizBillZhuanjiaExample example);

    /** biz_bill_zhuanjia */
    @Delete({
        "delete from biz_bill_zhuanjia",
        "where id = #{id,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String id);

    /** biz_bill_zhuanjia */
    @Insert({
        "insert into biz_bill_zhuanjia (id, uid, ",
        "uname, zhuying_shouru_flag, ",
        "jinfei_zhichu_flag, shbei_price_flag, ",
        "new_good_sell_flag, new_sell_prohibt_flag, ",
        "all_prohibt_flag, create_date, ",
        "update_date)",
        "values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, ",
        "#{uname,jdbcType=VARCHAR}, #{zhuyingShouruFlag,jdbcType=SMALLINT}, ",
        "#{jinfeiZhichuFlag,jdbcType=SMALLINT}, #{shbeiPriceFlag,jdbcType=SMALLINT}, ",
        "#{newGoodSellFlag,jdbcType=SMALLINT}, #{newSellProhibtFlag,jdbcType=SMALLINT}, ",
        "#{allProhibtFlag,jdbcType=SMALLINT}, #{createDate,jdbcType=TIMESTAMP}, ",
        "#{updateDate,jdbcType=TIMESTAMP})"
    })
    int insert(BizBillZhuanjia record);

    /** biz_bill_zhuanjia */
    @InsertProvider(type=BizBillZhuanjiaSqlProvider.class, method="insertSelective")
    int insertSelective(BizBillZhuanjia record);

    /** biz_bill_zhuanjia */
    @SelectProvider(type=BizBillZhuanjiaSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="uid", property="uid", jdbcType=JdbcType.VARCHAR),
        @Result(column="uname", property="uname", jdbcType=JdbcType.VARCHAR),
        @Result(column="zhuying_shouru_flag", property="zhuyingShouruFlag", jdbcType=JdbcType.SMALLINT),
        @Result(column="jinfei_zhichu_flag", property="jinfeiZhichuFlag", jdbcType=JdbcType.SMALLINT),
        @Result(column="shbei_price_flag", property="shbeiPriceFlag", jdbcType=JdbcType.SMALLINT),
        @Result(column="new_good_sell_flag", property="newGoodSellFlag", jdbcType=JdbcType.SMALLINT),
        @Result(column="new_sell_prohibt_flag", property="newSellProhibtFlag", jdbcType=JdbcType.SMALLINT),
        @Result(column="all_prohibt_flag", property="allProhibtFlag", jdbcType=JdbcType.SMALLINT),
        @Result(column="create_date", property="createDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_date", property="updateDate", jdbcType=JdbcType.TIMESTAMP)
    })
    List<BizBillZhuanjia> selectByExample(BizBillZhuanjiaExample example);

    /** biz_bill_zhuanjia */
    @Select({
        "select",
        "id, uid, uname, zhuying_shouru_flag, jinfei_zhichu_flag, shbei_price_flag, new_good_sell_flag, ",
        "new_sell_prohibt_flag, all_prohibt_flag, create_date, update_date",
        "from biz_bill_zhuanjia",
        "where id = #{id,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="uid", property="uid", jdbcType=JdbcType.VARCHAR),
        @Result(column="uname", property="uname", jdbcType=JdbcType.VARCHAR),
        @Result(column="zhuying_shouru_flag", property="zhuyingShouruFlag", jdbcType=JdbcType.SMALLINT),
        @Result(column="jinfei_zhichu_flag", property="jinfeiZhichuFlag", jdbcType=JdbcType.SMALLINT),
        @Result(column="shbei_price_flag", property="shbeiPriceFlag", jdbcType=JdbcType.SMALLINT),
        @Result(column="new_good_sell_flag", property="newGoodSellFlag", jdbcType=JdbcType.SMALLINT),
        @Result(column="new_sell_prohibt_flag", property="newSellProhibtFlag", jdbcType=JdbcType.SMALLINT),
        @Result(column="all_prohibt_flag", property="allProhibtFlag", jdbcType=JdbcType.SMALLINT),
        @Result(column="create_date", property="createDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_date", property="updateDate", jdbcType=JdbcType.TIMESTAMP)
    })
    BizBillZhuanjia selectByPrimaryKey(String id);

    /** biz_bill_zhuanjia */
    @UpdateProvider(type=BizBillZhuanjiaSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") BizBillZhuanjia record, @Param("example") BizBillZhuanjiaExample example);

    /** biz_bill_zhuanjia */
    @UpdateProvider(type=BizBillZhuanjiaSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") BizBillZhuanjia record, @Param("example") BizBillZhuanjiaExample example);

    /** biz_bill_zhuanjia */
    @UpdateProvider(type=BizBillZhuanjiaSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(BizBillZhuanjia record);

    /** biz_bill_zhuanjia */
    @Update({
        "update biz_bill_zhuanjia",
        "set uid = #{uid,jdbcType=VARCHAR},",
          "uname = #{uname,jdbcType=VARCHAR},",
          "zhuying_shouru_flag = #{zhuyingShouruFlag,jdbcType=SMALLINT},",
          "jinfei_zhichu_flag = #{jinfeiZhichuFlag,jdbcType=SMALLINT},",
          "shbei_price_flag = #{shbeiPriceFlag,jdbcType=SMALLINT},",
          "new_good_sell_flag = #{newGoodSellFlag,jdbcType=SMALLINT},",
          "new_sell_prohibt_flag = #{newSellProhibtFlag,jdbcType=SMALLINT},",
          "all_prohibt_flag = #{allProhibtFlag,jdbcType=SMALLINT},",
          "create_date = #{createDate,jdbcType=TIMESTAMP},",
          "update_date = #{updateDate,jdbcType=TIMESTAMP}",
        "where id = #{id,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(BizBillZhuanjia record);
}